Timer
Event Operations
After you
have established your application s timer resolution, you can start timer
events by using the timeSetEvent
There are two
types of timer events: single and periodic. A single timer event
occurs once, after a specified number of milliseconds. A periodic timer event
occurs every time a specified number of milliseconds elapses. The interval
between periodic events is called an event delay. Periodic timer events
with an event delay of 10 milliseconds or less consume a significant portion of
CPU resources.
The
relationship between the resolution of a timer event and the length of the
event delay is important in timer events. For example, if you specify a
resolution of 5 and an event delay of 100, the timer services notify the
callback function after an interval ranging from 95 to 105 milliseconds.
You can
cancel an active timer event at any time by using the timeKillEvent
Note The multimedia
timer runs in its own thread.